package javabase.schoolwork.day6_11;

import java.util.Date;

/**
 * @author fance
 * @date 2018/6/12 9:42
 */
public class ThreadTest {
    public static void main(String[] args) {
        Bank bank = Bank.getBank();
        bank.addAccounts(new Account("123", "123", new Date(), User.GenUser));
        bank.addAccounts(new Account("123", "456", new Date(), User.VipUser));

        ATM atm = new ATM("我家银行");
        atm.login("123", "123");


        Thread p1 = new Thread(new Producer(atm));
//        Thread p2 = new Thread(new Producer(atm));
       Thread c1 = new Thread(new Consumer(atm));
//        Thread c2 = new Thread(new Consumer(atm));
       p1.start();
        c1.start();

    }
    }

